#!/bin/bash

# 打印当前工作目录和环境信息
echo "当前工作目录: $(pwd)"
echo "PATH环境变量: $PATH"

echo "\n检查Git Bash版本:"
bash --version

# 检查make和ARM工具链
echo "\n检查make命令是否可用:"
which make || echo "make命令未找到"

echo "\n检查arm-none-eabi-gcc命令是否可用:"
which arm-none-eabi-gcc || echo "arm-none-eabi-gcc命令未找到"

# 如果找到了工具，尝试执行make
echo "\n尝试编译ODrive固件..."
make || echo "\n编译失败，请检查工具链配置。"